import './base.css';
import 'antd/dist/antd.css';
import React from 'react';
import ReactDOM from 'react-dom';
import {Menu,Icon} from 'antd';
const HtmlPage = React.createClass({
    render: function () {
        return (
            <div className="ant-layout-aside">
                <div className="ant-layout-header">
                    <div className="ant-layout-logo"></div>
                </div>
                <aside className="ant-layout-sider">
                    <Menu mode="inline" theme="dark" defaultSelectedKeys={['1']}>
                        <Menu.Item key="1"><Link to="/activity"><Icon type="bars" />活动列表</Link></Menu.Item>
                    </Menu>
                </aside>
                <div className="ant-layout-main">
                    <div className="ant-layout-content">
                        {this.props.children}
                    </div>
                </div>
            </div>
        );
    }
});

import {Router, Route, IndexRedirect, hashHistory, Link} from 'react-router';
import ActivityList from './routes/Activity/List';
import ActivityDetails from './routes/Activity/Details';
import Empty from './routes/Empty/Empty';
ReactDOM.render(
    <Router history={hashHistory}>
        <Route path="/" component={HtmlPage}>
            <IndexRedirect to="/activity" />
            <Route path="activity" component={ActivityList}/>
            <Route path="activity/:id" component={ActivityDetails}/>
            <Route path="2" component={Empty}/>
        </Route>
    </Router>
    , document.getElementById('root'));